package com.ruoyi.match.service.impl;

import com.ruoyi.match.domain.vo.UserInfoVo;
import com.ruoyi.match.mapper.UserInfoMapper;
import com.ruoyi.match.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;


    @Override
    public UserInfoVo selectUserInfo(Long userId) {

        return userInfoMapper.selectUserInfo(userId);
    }

    @Override
    public Long selectUserId(String userName) {
        return userInfoMapper.selectUserId(userName);
    }

    // 更新用户信息
    @Override
    public void updateUserInfo(UserInfoVo userInfoVo) {
        userInfoMapper.updateUserInfo(userInfoVo);
    }

    @Override
    public int checkPhoneUnique(String phoneNumber, Long userId) {
        return userInfoMapper.checkPhoneUnique(phoneNumber, userId);
    }

    @Override
    public int checkEmailUnique(String email, Long userId) {
        return userInfoMapper.checkEmailUnique(email, userId);
    }

    @Override
    public int checkNickNameUnique(String nickName, Long userId) {
        return userInfoMapper.checkNickNameUnique(nickName, userId);
    }


}
